﻿@{
    ViewBag.Title = "Welcome to Adsx24";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var domainName = System.Configuration.ConfigurationManager.AppSettings["domainName"];
    var domain = "." + domainName + ".com";
}
@*@Html.Action("PartialCheckUrl", "Home")*@
<script type="text/javascript">
    $(document).ready(function () {

        $(".chzn-select select").chosen();
        $(".chzn-select-deselect").chosen({ allow_single_deselect: false });
    });
     $.ajax({
        url: "@Url.Action("Check_Url", "Home")",
        dataType: "json",
        type: "POST",
        error: function() {
            alert("An error occurred.");
        },
        success: function(data) {
       
           if(data.message!='') {
              
                   var cur = data.message;

                    var url = 'http://'+cur+'@domain';

                    window.location.href = url;
               
                
            } else {
  
           }
            
        }
    });

</script>
<div class="row">
    <div class="span9">
        @Html.Action("Locations", "Home")
       
        @Html.Action("FeaturedList", "ClassifiedAds")
      
        @Html.Action("HomePageCategories", "ClassifiedAds")
    </div>
    <div class="span3" >
        @Html.ActionLink("POST A FREE Ad", "Create", "ClassifiedAds", new { }, new { @class = "btn btn-large btn-warning", @style = "width: 240px; text-align: center; height: 27px; font-size: 20px; margin-bottom: 15px;" })
        <div class="well stay-connect-top" style="background-color: #EEE">
            <div class="stay-connect">
                <h4>Stay Connected:</h4>
                <div class="sociallink">
                    <a class="facebook" target="_blank" href="https://www.facebook.com/Adsx24"></a>
                    <a class="twitter" target="_blank" href="http://twitter.com/adsx24"></a>
                    <div id="fb-root"></div>
                    <script>    (function (d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
    fjs.parentNode.insertBefore(js, fjs);
} (document, 'script', 'facebook-jssdk'));</script>
                    <div class="fb-like" data-href="https://www.facebook.com/Adsx24" data-send="false" data-layout="button_count" data-width="50" data-show-faces="false" data-font="segoe ui"></div>
                </div>
                <div class="clear"></div>
            </div>
        </div>
        @Html.Action("TopView","Home")
        <div>
            @*<div id="fb-root">
            </div>
            <script type="text/javascript">            (function (d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
    fjs.parentNode.insertBefore(js, fjs);
} (document, 'script', 'facebook-jssdk'));
            </script>*@
            <div class="fb-like-box" data-href="http://www.facebook.com/adsx24"
                 data-width="270" data-height="290" data-show-faces="true" data-stream="false"
                 data-header="true">
            </div>
            
            

        </div>
        <div class="clear">
        </div>
    </div>
    <div class="span12">
        @Html.Action("RecentViewList","Home")
    </div>
</div>

